package com.netintech.intelligenceInterface.common;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Locale;
import java.util.TimeZone;

/**
 * @author lining
 * @date 2021/4/29 13:07
 */
public class StaticBean {
    public static final String API_KEY = "1qaz2wsx";
    public static final String API_SECRET = "C68D62C5E68843F7AAD29F864B9C042=1C";
    public static final String URL1 = "http://50.78.128.152:8585";
    public static final String URL2= "http://50.78.128.143:8766";
    public static final String ALGORITHM_NAME = "hmacsha256";
    public static final long FIVE_MINUTES_MILLISECONDS = 5 * 60 * 1000L;
    public static final String TIME_ERROR = "时间错误，请校验时间后重试！";
    public static final String TIME_MISS = "date参数缺失！";
    public static final String HOST_MISS = "host参数缺失！";
    public static final String AUTHORIZATION_MISS = "authorization参数缺失！";
    public static final String AUTHORIZATION_FAILED = "鉴权失败！";
    public static final String SIGNATURE = "signature=";
    public static final String API_KEY_STR = "api_key=\"";
    public static final String ALGORITHM_STR = "\", algorithm=\"";

    public static final String IP_PREFIX = "ip:";
    public static final String BLACK_IP_PREFIX = "black_ip:";
    public static final int MAX_COUNT_EVERY_SECOND = 10;

    public static final String REALTIME_TRANSCRIBE = "realtimeTranscribe";
    public static final String AUTHORIZATION = "authorization";
    public static final String DATE = "date";
    public static final String HOST = "host";

    public static final ThreadLocal<DateFormat> LOCAL_DATE_FORMAT = new ThreadLocal<DateFormat>() {
        @Override
        protected DateFormat initialValue() {
            return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        }
    };
}
